Resource URL: /platform/<<version=3>>/auth/users/<USER>/member-of

    Overview: This resource applies the standard collection pattern to groups
              that a user is a member of.

     Methods: GET, POST

********************************************************************************

Method GET: List all groups the user is a member of.

       URL: GET /platform/<<version=3>>/auth/users/<USER>/member-of

Query arguments:
resolve_names=<boolean> Resolve names of personas.
          zone=<string> Filter groups by zone.
      provider=<string> Filter groups by provider.

GET response body schema:
{
  "type": "object", 
  "properties": {
    "resume": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options)."
    }, 
    "member_of": {
      "items": {
        "type": "object", 
        "description": "Specifies properties for a persona, which consists of either a 'type' and a 'name' or an 'ID'.", 
        "properties": {
          "type": {
            "enum": [
              "user", 
              "group", 
              "wellknown"
            ], 
            "type": "string", 
            "description": "Specifies the type of persona, which must be combined with a name."
          }, 
          "id": {
            "type": "string", 
            "description": "Specifies the serialized form of a persona, which can be 'UID:0', 'USER:name', 'GID:0', 'GROUP:wheel', or 'SID:S-1-1'."
          }, 
          "name": {
            "type": "string", 
            "description": "Specifies the persona name, which must be combined with a type."
          }
        }
      }, 
      "type": "array"
    }
  }
}

********************************************************************************

Method POST: Add the user to a group.

        URL: POST /platform/<<version=3>>/auth/users/<USER>/member-of

Query arguments:
    zone=<string> Filter groups by zone.
provider=<string> Filter groups by provider.

POST request body schema:
{
  "type": "object", 
  "description": "Specifies properties for a persona, which consists of either a 'type' and a 'name' or an 'ID'.", 
  "properties": {
    "type": {
      "enum": [
        "user", 
        "group", 
        "wellknown"
      ], 
      "type": "string", 
      "description": "Specifies the type of persona, which must be combined with a name."
    }, 
    "id": {
      "type": "string", 
      "description": "Specifies the serialized form of a persona, which can be 'UID:0', 'USER:name', 'GID:0', 'GROUP:wheel', or 'SID:S-1-1'."
    }, 
    "name": {
      "type": "string", 
      "description": "Specifies the persona name, which must be combined with a type."
    }
  }
}

POST response body schema:
{
  "type": "object", 
  "properties": {
    "id": {
      "required": true, 
      "type": "string", 
      "description": "ID of created item that can be used to refer to item in the collection-item resource path."
    }
  }
}
